<template>
    <div class="search">

        <el-button type="success" icon="el-icon-plus" size="mini" @click="dialogVisible = true">新增</el-button>


        <div class="search-box">
            <el-input v-model="input" placeholder="查找..." size="mini">
                <el-button type="success" icon="el-icon-search" slot="append"></el-button>
            </el-input>
        </div>

        <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
            <el-card>
                <el-form  :model="formInline" class="demo-form-inline">
                    <el-row>
                        <el-col :span="24">
                            <el-form-item>
                                <span slot="label">
                                    <span>
                                        模板
                                    </span>

                                </span>
                                <el-input v-model="formInline.user" placeholder="请选择模板"></el-input>
                            </el-form-item>
                            <el-form-item>
                                <span slot="label">
                                    <span>
                                        标题
                                    </span>

                                </span>
                                <el-select v-model="formInline.region" placeholder="活动区域">
                                    <el-option label="区域一" value="shanghai"></el-option>
                                    <el-option label="区域二" value="beijing"></el-option>
                                </el-select>
                            </el-form-item>

                        </el-col>
                    </el-row>

                </el-form>

            </el-card>
            <span slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">重置</el-button>
                <el-button type="primary" @click="addWork">下一步</el-button>
            </span>
        </el-dialog>
    </div>
</template>

<script>
export default {
    name: "search",
    data() {
        return {
            dialogVisible: false,
            formInline: {
                user: '',
                region: ''
            },
            input:"",

        }

    },
    methods: {
        handleClose(done) {
            this.$confirm('确认关闭？')
                .then(_ => {
                    done();
                })
                .catch(_ => { });
        },
        addWork(){
            console.log(11111);
            this.dialogVisible=false;
            this.$router.push("/addWork")
        }
    }



}
</script>

<style scoped>
.search {
    display: flex;
    justify-content: space-between;
}

.search-box {
    width: 151px;
}
.el-select{
    width: 100%;
}
</style>